<template>
  <div>
    <el-row> 
      <el-form :model="examceil" :rules="rules" ref="roomAssgin" label-width="100px" style="height:20px" >
        <el-col :span="12"  >
          <el-row style="float:right">
            <span>{{examceil.province}}</span>
            <el-input v-model="examceil.st" placeholder="考场编号" prop='st' style='width:100px' size="small"/>
            <span>~</span>
            <el-input v-model="examceil.en" placeholder="考场编号" prop='en' style='width:100px'/>
          </el-row>
        </el-col >
        <el-col :span="8">
            <el-input v-model="examceil.count" placeholder="请设置考场人数" prop='count'/>
            <span>{{(examceil.en-examceil.st+1)*examceil.count}}</span>
        </el-col >
        <el-col :span="3">
           <span>请设置考场人数</span>
        </el-col >
      </el-form>
    </el-row>
     <el-row>
      <el-form :model="examceil" :rules="rules" ref="roomAssgin" label-width="100px" class="demo-ruleForm" >
        <el-col :span="12"  >
          <el-row style="float:right">
            <span>{{examceil.province}}</span>
            <el-input v-model="examceil.st" placeholder="考场编号" prop='st' style='width:100px'/>
            <span>~</span>
            <el-input v-model="examceil.en" placeholder="考场编号" prop='en' style='width:100px'/>
          </el-row>
        </el-col >
        <el-col :span="8">
            <el-input v-model="examceil.count" placeholder="请设置考场人数" prop='count'/>
            <span>{{(examceil.en-examceil.st+1)*examceil.count}}</span>
        </el-col >
        <el-col :span="3">
           <span>请设置考场人数</span>
        </el-col >
      </el-form>
    </el-row>
  </div>
</template>
<script>
  export default {
    props:{
        examceil: {type:Object,default:{
          st:'',
          en:'',
          count:'',
          province:'浙江',
          total:400
        },
    },
    data() {
      return {
        rules: {
          st: [
            { required: true, message: '输入整数', trigger: 'blur' },
            { validator: isNum, trigger: 'blur' }
          ],
          en: [
            { required: true, message: '输入整数', trigger: 'blur' },
            { validator: isNum, trigger: 'blur' }
          ]
        }
      };
    },
    methods: {
      upok(response, file, fileList){
        
        this.studio.url=file.name

      },
      submitForm(formName) {
        this.$refs[formName].validate((valid) => {
          if (valid) {
            alert('submit!');//这里就是符合规则，然后去调对应的接口
          } else {
            console.log('error submit!!');
            return false;
          }
        });
      },
      resetForm(formName) {
        this.$refs[formName].resetFields();
      }
    }
  }
  }
</script>